#include "dominion.h"
#include "rngs.h"
#include "dominion_helpers.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>

int main(int argc, char **argv)
{
	//int count = 0;
	
	struct gameState *test = newGame();
	
	//add 39 cards to deck
	test->deckCount[0] = 20;
	test->handCount[0] = 6;
	test->discardCount[0] = 13;
	
	
	if(fullDeckCount(0, 0, test)== 39)
		{
			printf("Test passed.\n");
		}
		
	else
		printf("Test failed, deck count: %d\n", fullDeckCount(0, 0, test));
	
	//get close to max value
	test->deckCount[0] = 200;
	test->handCount[0] = 130;
	test->discardCount[0] = 130;
	
	if(fullDeckCount(0, 0, test)== 460)
		{
			printf("Test passed.\n");
		}
		
	else
		printf("Test failed, deck count: %d\n", fullDeckCount(0, 0, test));
		
	//exceed max value
	test->deckCount[0] = 200;
	test->handCount[0] = 1300;
	test->discardCount[0] = 130;
	
	if(fullDeckCount(0, 0, test)== 1630)
		{
			printf("Correct deck count, but max value was exceeded.\n");
		}
		
	else
		printf("Test failed when deck count exceeded max deck count, deck count: %d\n", fullDeckCount(0, 0, test));
	
	//change card value
	//add 39 cards to deck
	test->deckCount[0] = 20;
	test->handCount[0] = 6;
	test->discardCount[0] = 13;
	
	
	if(fullDeckCount(0, 2, test)== 39)
		{
			printf("Test passed.\n");
		}
		
	else
		printf("Test failed, deck count: %d\n", fullDeckCount(0, 2, test));

	return 0;
}